﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IReportRepository.cs" company="Collaboris Ltd.">
//   Copyright (c) Collaboris Ltd. All rights Reserved.
// </copyright>
// <summary>
//   Responsible for storing and retrieving Macro Reports from a persistance media
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Collaboris.Saf.Repositories
{
    /// <summary>
    /// Responsible for storing and retrieving Macro Reports from a persistance media
    /// </summary>
    public interface ISafRepository<T> where T : class
    {
        #region Public Methods

        /// <summary>
        /// Gets the report from a persistnace media.
        /// </summary>
        /// <param name="name">
        /// The name.
        /// </param>
        /// <returns>
        /// </returns>
        T LoadObject(string name);

        /// <summary>
        /// Saves the report to a persistnace media.
        /// </summary>
        /// <param name="name">
        /// The name.
        /// </param>
        /// <param name="report">
        /// The report.
        /// </param>
        void SaveObject(string name, T report);

        #endregion
    }
}